package org.cagt;

/**
 * Abstract card interface. Card must be comparable to another card. Card also
 * must belong to some deck.
 * 
 * @author konrad.szalkowski (at) gmail.com
 * 
 */
public abstract class Card {
	private int id = 0;

	/**
	 * Sets the unique id of card.
	 * 
	 * @param id
	 *            Id
	 */
	protected void setId(int id) {
		this.id = id;
	}

	/**
	 * Return the unique id of card.
	 * 
	 * @return
	 */
	public int getId() {
		return id;
	}

	/**
	 * Card object must implement hashCode.
	 */
	@Override
	public int hashCode() {
		return id;
	}

	/**
	 * Card object must implement equals.
	 */
	@Override
	public abstract boolean equals(Object object);
}
